// 读取views目录下所有index.vue文件
export function readViews() {
  const views = import.meta.globEager("../views/**/index.vue");
  const pageMap = Object.keys(views).reduce((cur, next) => {
    const basePath = "../views/";
    const key = next.slice(basePath.length);
    cur[key] = views[next].default || {};
    return cur;
  }, {});
  return pageMap;
}
